Fix C99-ism.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Sep 2003 12:09:43 +0000 (12:09 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Sep 2003 12:09:43 +0000 (12:09 +0000)
gpsbabel/navicache.c

index 929073730f7f710020ccb24a16ab2cd6ca6cd474..de6d2500c4a3958aff54b579fa0f8852712a9645 100644 (file)
@@ -101,8 +101,8 @@ static void
 nav_start(void *data, const char *el, const char **attr)
 {
        if (0 == strcmp(el, "CacheDetails")) {
-               wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1);
                const char **ap;
+               wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1);
                for (ap = attr; *ap; ap+=2) {
                        if (0 == strcmp(ap[0], "cache_id")) {
                                wpt_tmp->shortname = xstrdup(ap[1]);